/*
 ============================================================================
 Name		: GaborJet.h
 Author	  : lenli
 Version	 : 1.0
 Copyright   : 2008
 Description : CGaborJet declaration
 ============================================================================
 */

#ifndef GABORJET_H
#define GABORJET_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <ncvImage.h> //NokiaCV CNokiaCVImage Class

// CLASS DECLARATION

/**
 *  CGaborJet
 * 
 */
class CGaborJet : public CBase
	{
public:
	// Constructors and destructor

	/**
	 * Destructor.
	 */
	~CGaborJet();

	/**
	 * Two-phased constructor.
	 */
	static CGaborJet* NewL(CNokiaCVImage *aImage, TPoint aFaceFeature, TInt aSigma,
						   TInt aRadius, TInt aFreqs, TInt aMinFreq, TInt aMaxFreq,
						   TInt aAngles);

	/**
	 * Two-phased constructor.
	 */
	static CGaborJet* NewLC(CNokiaCVImage *aImage, TPoint aFaceFeature, TInt aSigma,
						    TInt aRadius, TInt aFreqs, TInt aMinFreq, TInt aMaxFreq,
						    TInt aAngles);
	
	/**
	 * Constructor for performing 1st stage construction
	 */
	CGaborJet();
	
	/**
	 * Function return percentual similarity between gabor jets.
	 */
	TReal GetSimilarity(CGaborJet *aJet);
	
	/**
	 * Function for getting the number of values = size of the jet.
	 */
	TInt GetSize();
	
	/**
	 * Function return the value of this jet at the specified position.
	 */
	inline TReal GetValue(TInt index){return iValues->At(index);}
	
	/**
	 * Sets the values of this jet from external array - used by loading facegraph from file.
	 */
	void SetValuesL(CArrayFixFlat<TReal>* aValues);

private:

	/**
	 * EPOC default constructor for performing 2nd stage construction
	 */
	void ConstructL(CNokiaCVImage *aImage, TPoint aFaceFeature, TInt aSigma,
				    TInt aRadius, TInt aFreqs, TInt aMinFreq, TInt aMaxFreq,
				    TInt aAngles);
private:
	CArrayFixFlat<TReal>* iValues;

	};

#endif // GABORJET_H
